home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / ip / ka9q / MacBMsrc.hqx / Mac bm Project / bm.h next >
Encoding:
C/C++ Source or Header  |  1989-02-14  |  3.1 KB  |  122 lines

  1. /* bm.h -- definitons for bm.c that aren't included elsewhere */
  2.  
  3. /* types of config file lines that we know how to handle */
  4. #define NONE    0
  5. #define MAXLET    1
  6. #define SMTP    2
  7. #define HOST    3
  8. #define USER    4
  9. #define EDIT    6
  10. #define NAME    7
  11. #define REPLY    8
  12. #define MBOX    9
  13. #define RECORD    10
  14. #define SCREEN    11
  15. #define FOLDER    12
  16. #define MQUEUE    13
  17. #define ALIAS    14
  18. #ifdef MAC
  19. #define TIMEZONE 15
  20. #endif
  21.  
  22. #ifdef MAC
  23. #define RUNCOM "bm.rc"
  24. #else
  25. #ifdef UNIX
  26. #define    RUNCOM    ".bmrc"        /* config file */
  27. #else
  28. #define    RUNCOM    "/bm.rc"        /* config file */
  29. #endif
  30. #endif
  31.  
  32. #define WORK    "*.wrk"        /* work file type */
  33. #ifdef MSDOS
  34. #define    MAXROWS        25    /* number of lines on display */
  35. #define    MAXCOL        80    /* number of lines on display */
  36. #else
  37. #define    MAXROWS        24    /* number of lines on display */
  38. #define    MAXCOL        80    /* number of lines on display */
  39. #endif
  40.  
  41. /* message status */
  42. #define    DELETE    1
  43. #define    READ    2
  44.  
  45. #define NLET    300            /* default size of letter array */
  46. #define MAXARGS    16
  47.  
  48. #define SLINELEN    256
  49. #define LINELEN        256
  50.  
  51. /* a mailbox list entry */
  52. struct let {
  53.     long    start;
  54.     long    size;
  55.     int    status;
  56. };
  57.  
  58. /* address structure */
  59. struct addr {
  60.     struct addr *next;
  61.     char *user;
  62.     char *host;
  63.     int sent;
  64. };
  65.  
  66. /* token used for a string and its token */
  67. struct token {
  68.     char *str;
  69.     char type;
  70. };
  71.  
  72. /* global definitions */
  73. extern char
  74.      *hostname,        /* name of this host from rc file */
  75.     *username,        /* name of this user from rc file */
  76.     *fullname,        /* name of this user from rc file */
  77.     *replyto,        /* return address fro reply-to */
  78.     *maildir,        /* default mail directory */
  79.     *editor,        /* user's favorite editor program */
  80.     *savebox,        /* user's mbox for the s command */
  81.     *record,        /* place to store a copy of snet mail for you */
  82.     *folder,        /* directory used for save and write commands */
  83.     *mfilename;        /* for the -f option */
  84.  
  85. extern unsigned maxlet;        /* max messages */
  86. extern int current;        /* the current message number */
  87. extern int nmsgs;        /* number of messages in this mail box */
  88. extern int newmsgs;        /* number of new messages in mail box */
  89. extern int change;        /* mail file changed */
  90. extern FILE *mfile;        /* mail data file pointer */
  91. extern int tty;            /* is standard in a tty ? */
  92. extern int qflag;        /* just queue no headers */
  93. extern int mlock(), rmlock();
  94. extern struct addr *make_tolist();
  95. extern long get_msgid();
  96. extern char mailqdir[];
  97. extern char mailspool[];
  98. extern char *mqueue;
  99. extern char alias[];
  100. extern char notename[];
  101. extern char notefile[];
  102. extern char nomail[];
  103. extern char badmsg[];
  104. extern struct let *mbox;
  105. extern char *fgets(),*gets(),*savestr();
  106. extern char *malloc(),*calloc();
  107. extern void exit(),perror();
  108. extern int parse(),htype();
  109. extern int getrch(), screen_clear(), setrawmode(), setcookedmode(), isnewmail();
  110. #ifndef MAC
  111. /* Define null object pointer in case stdio.h isn't included */
  112. #ifndef    NULL
  113. /* General purpose NULL pointer */
  114. #define    NULL (void *)0
  115. #endif
  116. #define    NULLCHAR (char *)0    /* Null character pointer */
  117. #define    NULLFP     (int (*)())0    /* Null pointer to function returning int */
  118. #define    NULLVFP     (void (*)())0    /* Null pointer to function returning void */
  119. #define    NULLFILE (FILE *)0    /* Null file pointer */
  120. #endif
  121. #define    NULLADDR (struct addr *)0    /* Null address */
  122.